Relax upstream boost version in substvars. (Closes: #1130578)
authorAnton Gladky <gladk@debian.org>
Mon, 16 Mar 2026 05:12:27 +0000 (06:12 +0100)
committerAnton Gladky <gladk@debian.org>
Mon, 16 Mar 2026 05:12:27 +0000 (06:12 +0100)
debian/control
debian/rules

index fc559d93def1da2f5f5963bfdfe655b7d4cf150e..139be33a8dc7726ad084719463bfa78626d98916 100644 (file)
@@ -85,7 +85,7 @@ Depends: ${misc:Depends},
          ${shlibs:Depends},
          default-jdk [!hppa !hurd-any],
          default-libmysqlclient-dev,
-         libboost-dev (= ${boost:Version}),
+         ${boost:Depends},
          libavcodec-dev,
          libavformat-dev,
          libavutil-dev,
index e3e1ba08edafbaf19936b0a390bb9cda15287b25..f1183d38b20efaf6a39106494a69fe3504dda0ab 100755 (executable)
@@ -169,10 +169,13 @@ execute_after_dh_installdocs-indep:
        find $(CURDIR)/debian/vtk9-doc/ -type f -print0 | xargs -0 sed -i 's/https:\/\/raw\.githubusercontent\.com//g'
        find $(CURDIR)/debian/vtk9-doc/ -type f -print0 | xargs -0 sed -i 's/https:\/\/cdn\.jsdelivr\.net\/npm\/mathjax@2/\/usr\/share\/javascript\/mathjax/g'
 
-# Record the exact Boost version used at build time so that libvtk9-dev
-# pulls in the same version and triggers a rebuild when Boost is upgraded.
+# Track the versioned libboost*-dev at upstream version only, to avoid rebuilds
+# on boost-defaults/binNMU uploads.
 execute_before_dh_gencontrol:
-       echo "boost:Version=$$(dpkg-query -W -f='$${Version}' libboost-dev)" >> debian/libvtk9-dev.substvars
+       boost_pkg=$$(dpkg-query -W -f='$${Package}\n' 'libboost*-dev' 2>/dev/null \
+               | sed -nE '/^libboost[0-9]+\.[0-9]+-dev$$/p' | sort -V | tail -n1) && \
+       boost_ver=$$(dpkg-query -W -f='$${Version}' "$$boost_pkg" | sed 's/-[^-]*$$//') && \
+       echo "boost:Depends=$$boost_pkg (>= $$boost_ver)" >> debian/libvtk9-dev.substvars
 
 ifeq ($(DEB_HOST_ARCH),sh4)
 override_dh_dwz: